home *** CD-ROM | disk | FTP | other *** search
/ Languguage OS 2 / Languguage OS II Version 10-94 (Knowledge Media)(1994).ISO / gnu / djgpp / readme.dj < prev    next >
Text File  |  1994-06-29  |  16KB  |  403 lines

  1.  
  2. This is the README file for DJ's GCC port to DOS ("djgpp")
  3.  
  4. Contents:
  5.     * Overview
  6.     * What's available
  7.     * How to install
  8.     * Deviations and Caveats
  9.     * Copyright information
  10.  
  11. Disclaimer: This software is distributed WITHOUT ANY WARRANTY; without
  12. even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
  13. PURPOSE.
  14.  
  15. DJ Delorie
  16. USmail: 24 Kirsten Ave, Rochester, NH 03867-2954, USA
  17. email:  dj@ctron.com
  18.  
  19. mailing list: djgpp@sun.soe.clarkson.edu (listserv@sun.soe.clarkson.edu)
  20.      djgpp-announce@sun.soe.clarkson.edu (listserv@sun.soe.clarkson.edu)
  21.      (do not send add/delete messages to djgpp or djgpp-announce)
  22.  
  23.  
  24.  
  25. Overview:
  26.  
  27. This package contains a 32-bit 80386 DOS extender with symbolic
  28. debugger, a C/C++ compiler with utilities, development libraries, and
  29. source code.  It generates full 32-bit programs and supports full
  30. virtual memory with paging to disk. 
  31.  
  32. Requirements:
  33.  
  34. A 80386-based IBM compatible PC or PS/2, 4Mb of hard drive space (70M
  35. for full install), and 512K RAM.  Available extended (or expanded under
  36. VCPI) memory is strongly recommended. 
  37.  
  38. Supported Wares:
  39.  
  40. * Up to 128M of extended memory (expanded under VCPI)
  41. * Up to 128M of disk space used for swapping
  42. * SuperVGA 256-color mode up to 1024x768
  43. * 80387
  44. * XMS & VDISK memory allocation strategies
  45. * VCPI programs, such as QEMM, DESQview, and 386MAX
  46. * DPMI programs, such as Windows 3.x, OS/2, and QDPMI
  47.  
  48. Unsupported:
  49.  
  50. * Multiprocessing (fork())
  51.  
  52.  
  53.  
  54.  
  55. File location:
  56.  
  57.     host:      omnigate.clarkson.edu
  58.     login:     ftp
  59.     password:  send your e-mail address
  60.     directory: ~ftp/pub/msdos/djgpp
  61.  
  62. Many thanks to the sysops at Clarkson for providing a home to djgpp!
  63.  
  64. As a convenience to non-FTP users, djgpp is also stored on Clarkson's
  65. archive server.  To access the archive server, do this:
  66.  
  67.    % mail archive-server@omnigate.clarkson.edu
  68.    Subject: <none>
  69.    help
  70.    index msdos/djgpp
  71.    ^D
  72.  
  73. NOTE: In accordance with FSF CopyLeft, you are not allowed to upload
  74. this program to a distribution site unless you upload the source modules
  75. with any binary module you upload.  Please read the file COPYING for
  76. more details. 
  77.  
  78. NOTE: If your application links in object modules that were written by
  79. FSF, your application counts as a "derived work" and must obey the
  80. provisions of the FSF Copyrights.  See the file COPYING for details. 
  81. All FSF source-based libraries are in the file libgpl.a and libgpp.a. 
  82. The mere act of compiling does not affect the copyright status of your
  83. program. 
  84.  
  85.  
  86.  
  87.  
  88.  
  89.  
  90.  
  91.  
  92.  
  93. INSTALLING:
  94.  
  95. To install, you must do the following:
  96.  
  97. * Create a "temp" directory, like c:\tmp.
  98.  
  99. * Create a directory to install in, like c:\djgpp.
  100.  
  101. * Un-zip the appropriate zipfiles in the install directory.
  102.     C:\DJGPP> unzip -o djeoe111.zip    (Minimum runtime stuff - required)
  103.     C:\DJGPP> unzip -o djdev111.zip    (Minimum development stuff - required)
  104.     C:\DJGPP> unzip -o gcc257bn.zip    (The C compiler - required)
  105.     C:\DJGPP> unzip -o gas211bn.zip    (The assembler - required)
  106.     C:\DJGPP> unzip -o bnu22bn.zip    (The linker etc - required)
  107.  
  108.     C:\DJGPP> unzip -o djdoc111.zip    (If you want documentation)
  109.     C:\DJGPP> unzip -o txi210bn.zip    (If you want the online doc reader INFO.EXE)
  110.     C:\DJGPP> unzip -o gpp257.zip    (If you want to compile C++)
  111.     C:\DJGPP> unzip -o objc257.zip    (If you want to compile Objective-C)
  112.     C:\DJGPP> unzip -o bsn121bn.zip    (If you want to use bison)
  113.     C:\DJGPP> unzip -o flx238bn.zip    (If you want to use flex)
  114.     C:\DJGPP> unzip -o gzp124bn.zip    (If you want gzip)
  115.     C:\DJGPP> unzip -o zip50bn.zip    (If you want zip and unzip)
  116.  
  117.     C:\DJGPP> unzip -o dj111m1.zip      (Maintainence releases)
  118.     
  119.   The maintainance releases are numbered dj111m1.zip, dj111m2.zip, etc.
  120.   Install them all, in order, after all other modules. 
  121.  
  122.   If you prefer to use pkunzip, use "pkunzip -d -o" instead of "unzip -o".
  123.  
  124.   Note: The file "unzip-dj.exe" is available from where you got djgpp.
  125.   It is Info-Zip's unzip v5.0 built with djgpp, and includes a built-in
  126.   copy of go32.exe.
  127.  
  128.   Other .zip files contain various documentation (*dc.zip) and source
  129.   files (*sr.zip, *s1.zip, etc).
  130.  
  131. * If you are installing over an existing djgpp area, make sure you remove
  132.   the files bin/aout2exe.exe and bin/exe2aout.exe.  They have been replaced
  133.   with coff2exe and exe2coff.  Also, some programs may not work correctly
  134.   if using an old version of go32 and/or an old emu387, so be sure to remove
  135.   any old versions of these files.
  136.  
  137. * Add the following lines to C:\CONFIG.SYS file (or edit existing
  138.   files= and shell= lines as appropriate).  The files= line prevents "too many
  139.   open files" errors when compiling, and the shell= line prevents "Out of
  140.   environment space" errors when setting lots of environment variables.
  141.  
  142.     files=15
  143.     shell=c:\command.com c:\ /e:1000 /p
  144.  
  145. The values 15 and 1000 are close to minimal.  You may want to increase them
  146. to provide a little more margin.
  147.  
  148.  
  149. * Add the following lines to C:\AUTOEXEC.BAT:
  150.     call c:\djgpp\bin\setdjgpp c:\djgpp c:/djgpp
  151.         (note the use of '\' in the first option and '/' in the second)
  152.  
  153. * Optionally, add these lines to override the defaults set by setdjgpp:
  154.  
  155.     set TMPDIR=c:/tmp
  156.              ^^^ this is where gcc's temp files go.  It should be a ramdrive
  157.              if you have one.
  158.     set GO32TMP=c:/tmp
  159.                 ^^^ this is where your paging file goes - if not set, the
  160.                 variables TMP and TEMP are checked in that order.  This
  161.                 should be a real drive.
  162.     set GO32=driver c:/djgpp/drivers/SOMETHING.grd gw 1024 gh 768
  163.                     ^^^ whatever driver works with your VGA (optional)
  164.  
  165.   Remember that unless you manually type these at the command line,
  166.   they won't take effect until you reboot.  Don't include the "ansi"
  167.   keyword in the "go32" variable if you don't have an ANSI.SYS driver
  168.   or equivalent.
  169.  
  170. * Add your binaries directory to your PATH in C:\AUTOEXEC.BAT
  171.     SET PATH= . . . ;c:\djgpp\bin
  172.  
  173. That's it! djgpp is now installed on your system.
  174.  
  175. To try it out, change into the samples/hello directory of the DJGPP
  176. distribution and type "tryit".  If this doesn't work, run "testit",
  177. which will check things out for you. 
  178.  
  179. Note: For some operating systems, such as OS/2 and NT, you may need to
  180. use the 16-bit gcc driver instead of the 32-bit gcc driver.  To do so,
  181. copy the gcc.exe file from utils/gcc-rm/gcc.exe to bin/gcc.exe. 
  182. Don't forget to save the old gcc.exe first!
  183.  
  184.  
  185.  
  186. The GO32 environment variable:
  187.  
  188.  
  189. This variable controls the options available in go32.  The syntax of
  190. this variable is:
  191.  
  192.   SET GO32=[parm [value]] [parm [value]] . . .
  193.  
  194. Parameters:
  195.  
  196.   ansi           Use ANSI commands to control the color in edebug32
  197.   mono           Use the Monochrome monitor for debugging - useful when
  198.                    debugging graphics applications
  199.   topline        Display status information on the top line of the screen
  200.                  (or the top of the mono monitor)
  201.   1rm            Redirect stdout (file #1) to the monochrome monitor
  202.   2rm            Redirect stderr (file #2) to the monochrome monitor
  203.   1r2            Redirect stdout (file #1) to stderr (file #2)
  204.   2r1            Redirect stderr (file #2) to stdout (file #1)
  205.   nodpmi         don't use dpmi even if you find it.
  206.   core [file]    append exception traceback to the named file.
  207.  
  208.   glob           enable globbing (default)
  209.   noglob         disable globbing
  210.  
  211.   emu [path]     Use the specified file as the 80387 emulator
  212.  
  213.   driver [path]  Use the specified file as the graphics driver
  214.   gw [width]     Default graphics width
  215.   gh [height]    Default graphics height
  216.   tw [width]     Default text width
  217.   th [height]    Default text height
  218.   nc [colors]    Number of colors (for new-style drivers only - see cbgrx*.zip)
  219.  
  220.  
  221. These parameters may occur in any order.
  222.  
  223. Note that "1rm" and "2rm" are done before "1r2" and "2r1", so "1rm 2r1" sends
  224. stdout to the mono monitor and stderr to any redirection used.
  225.  
  226. Examples:
  227.  
  228.   C:\> set GO32=mono driver c:\djgpp\drivers\tseng4k.grd gw 1024 gh 768 tw 132 th 43 nc 256
  229.   C:\> set GO32=ansi
  230.   C:\> set GO32=driver c:\djgpp\drivers\tseng4k.grd ansi
  231.   C:\> set GO32=mono 1rm 2rm nodpmi topline
  232.  
  233.  
  234.  
  235.  
  236. Debugging:
  237.  
  238. To debug your code, compile with "gcc -g".  Then, run the executable
  239. with a line like this:
  240.  
  241.   C:\> go32 -d edebug32 myprog        (for non-DPMI)
  242.   C:\> go32 -d ed32-dpmi myprog       (for DPMI)
  243.  
  244. See the docs/djgpp/edebug32.doc file for information on edebug32 commands.
  245.  
  246.  
  247.  
  248.  
  249.  
  250.  
  251.  
  252.  
  253. Deviations and Caveats:
  254.  
  255. GCC/G++ deviates from the U**x version in a number of ways, mostly to
  256. accomodate deficiencies in the MS-DOS environment, and my own laziness.
  257.  
  258. * An 80387 is required to do floating point.  An emulator is provided.
  259.   cc1 and cc1plus shouldn't use the 387 unless compiling floating point
  260.   code.  The environment variable "387" can override the auto-detection
  261.   routine:
  262.     SET 387=YES   to force 387 handlers to be enabled
  263.     SET 387=NO    to force 387 accesses to fault
  264.     SET 387=QUERY to get a message showing the results of the auto-detection
  265.   If no 80387 is present and the program attempts to use it, a message
  266.   indicating where the instruction is will be displayed.  To use the
  267.   387 emulator, add "emu c:\djgpp\bin\emu387" to the GO32 environment
  268.   variable.  Specifying use of the emulator overrides the "387"
  269.   environment variable and autodetection code.
  270.  
  271. * The VDISK method of allocating extended memory is supported.  The
  272.   INT 15h method is also.  When the extender runs out of conventional and
  273.   extended memory, it uses a paging file named $(GO32TMP)/pgXXXXXX.386, where
  274.   XXXX is an unspecified hex value.  This file is normally removed on exit.
  275.  
  276. * Up to 128 MB of physical memory and 128 MB of disk swap space are allowed.
  277.   A 512K machine is sufficient, but very slow due to paging.
  278.  
  279. * The utilies support the MS-DOS standard response file method for giving
  280.   more than 128 bytes of command line.  Example: "gcc -o foo @foo.lnk" where
  281.   foo.lnk contains a list of .o files.  Wildcard expansion (globbing) is
  282.   performed on the parameters, unless they are surrounded by single quotes.
  283.   Double quotes can be used to prevent spaces from separating arguments.
  284.   Also supported is the GNUish-DOS method of passing arguments in
  285.   environment variables.
  286.  
  287. * Since MS-DOS does not distinguish case in file names, some .h files
  288.   used for C++ have had underscores prepended to them to avoid conflict
  289.   (ie: String.h conflicts with string.h, so it became _String.h).
  290.  
  291. * The extender can be merged to create one .exe file that is the extender
  292.   and the executable in one file, by using the stub.exe program:
  293.     coff2exe myprog   (this merges stub.exe, and go32.exe is still required)
  294.     coff2exe -s go32.exe myprog   (this merges go32.exe)
  295.   The first case will only work if go32.exe is in your search path, because
  296.   stub.exe runs it.  Alternatively, you can prepend go32.exe itself to an
  297.   COFF file to get a single executable (stub.exe is much smaller).  Note
  298.   that if you re-compile go32 or stub, you must strip off the symbol table
  299.   first.  Also note that coff2exe is designed to align the executable
  300.   image for better performance, so coff2exe'd programs will run faster
  301.   than those built with copy /b.
  302.  
  303. * The extender runs programs at logical address 0.  A copy of the first
  304.   1 MB of physical memory (including the AT channel) is mapped to
  305.   0xE0000000 in the program's address space.  The stack grows down from
  306.   0x7FFFFFFC in the program's address space.  These numbers may be
  307.   different under DPMI.
  308.  
  309. * The paging mechanism understands how SuperVGA's map their memory onto
  310.   the AT bus and automatically swaps pages as the program tries to
  311.   access them.  The program sees a linear range from 0xD0000000 to
  312.   0xD0100000 that corresponds to each pixel in the 256-color modes
  313.   of SuperVGAs.  To use this feature, you'll have to set the GO32
  314.   environment variable like this:
  315.     C>set go32=driver c:\djgpp\drivers\tseng4k.grd gw 640 gh 480 tw 132 th 43
  316.   These parameter pairs can be omitted or rearranged as needed.  They are
  317.   the "driver" name, default graphics width and height, and default
  318.   text width and height. Libgr.a doesn't have to be recompiled, nor
  319.   do graphics programs, when a different graphics mode is selected
  320.   (the extender handles it).  It is strongly recommended that the program
  321.   use the GR_default_graphics and GR_default_text modes to switch to
  322.   graphics or text.  These modes use the parameters specified by the
  323.   GO32 environment variable, allowing the user to select a favorite
  324.   graphics and text mode.
  325.  
  326. * Symbols are stored in virtual memory, so you won't run out of symbol
  327.   space until both extended memory and the disk are all used up.  For
  328.   large programs, you might notice a slight delay while it looks up
  329.   symbols.
  330.  
  331. * Signals are not reported to the program.  However, interrupts do continue
  332.   to get serviced while in protected mode (ie: keypress, timer, etc).
  333.   CTRL-C will get you back to the external debugger, and you can continue
  334.   from where you stopped.  All signals (ie: exceptions) cause debugging
  335.   traps in the external debugger, or general faults in go32.
  336.  
  337.  
  338.  
  339. Copyright Information:
  340.  
  341. * Source code for the GNU utilities is copyright (c) Free Software Foundation.
  342.   For more information on the FSF copyright, see their source code or write
  343.   Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  344.  
  345.   A copy of their file "COPYING" is included in the docs directory.  Some of
  346.   the FSF source code has been modified to operate properly in the MS-DOS
  347.   environment.
  348.  
  349. * Source code for most of libc.a are copyright (c) Regents of the University
  350.   of California.  These files include copyright information in them.  The
  351.   utilities are compiled against these libraries, and thus contain software
  352.   developed by the University of California, Berkeley, and its contributors.
  353.   Some of the BSD source code has been modified to operate properly in the
  354.   MS-DOS environment.
  355.  
  356. * Any sources not falling under the copyrights of FSF or UCB (as above) are
  357.   Copyright (c) 1991 DJ Delorie, 24 Kirsten Ave, Rochester NH 03867-2954.
  358.   To contact me via E-Mail, sent to "dj@ctron.com".  Cabletron Systems Inc
  359.   is in no way involved with this project; I just happen to work for them
  360.   during the day.
  361.  
  362. Terms and Conditions:
  363.  
  364. * Source code copyright FSF is distributed under the terms of the GNU
  365.   Public General License.  See the file "COPYING" in doc.arc for more
  366.   information.  If your program links in object modules (in libc.a) that
  367.   are compiled from GNU sources, then your entire program must be
  368.   distributed under the terms of the GNU GPL as a "derived work".  These
  369.   modules are the C++ class library (including the streams classes) and
  370.   obstacks, and are restricted to the libgpl.a lbrary.  The sources in
  371.   libsrc have the copyright notices in them for the various modules.
  372.  
  373. * Source code copyright UCB is distributed under the terms listed in the
  374.   UCB source code itself.
  375.  
  376. * Source code copyright DJ Delorie is distributed under the terms of
  377.   the file "copying.dj".
  378.  
  379. * Changes to source code copyright BSD or FSF are copyright DJ Delorie, but
  380.   fall under the terms of the original copyright.
  381.  
  382.  
  383.  
  384.  
  385.  
  386. Donations may be made to any of the following:
  387.  
  388.     DJ Delorie
  389.     24 Kirsten Ave
  390.     Rochester, NH  03867-2954
  391.     USA
  392.  
  393.     Free Software Foundation
  394.     675 Mass Ave
  395.     Cambridge, MA  02139
  396.     USA
  397.  
  398.     Computer Systems Research Group
  399.     Computer Science Division, EECS
  400.     University of California
  401.     Berkeley, California  94720
  402.     USA
  403.